/* 
 * File:   StackListCommand.cpp
 * Author: Gab'z
 * 
 * Created on 5 juin 2012, 10:59
 */

#include "StackListCommand.h"
#include "../../Context.h"
#include "../../../exception/CommandException.h"
#include "../../../exception/MementoException.h"

namespace calculator {

    StackListCommand::StackListCommand(const std::string name) : UndoableRedoableCommand(name) {
    }

    StackListCommand::~StackListCommand() {
    }

    void StackListCommand::execute() const throw (CommandException) {
        try {
            apply(Context::getInstance()->getStackList());
        } catch (CommandException& e) {
            throw;
        }
    }

}
